<template>
	<div class="div1">
		<!-- 头部 -->
		<!-- 中部内容 -->
		<Head></Head>
		<div>
			<!-- banner页面 -->
			<banner ref="bannerRef"></banner>
			<!-- banner页面 -->
			<!-- 产品核心技术 -->
			<coreTechnology></coreTechnology>
			<!-- 产品核心技术 -->
		</div>
		<!-- 底部 -->
		<Foots></Foots>
	</div>
</template>
<script>
import Foots from '@/components/foots.vue'
import Head from '@/components/head.vue'
import banner from '@/components/banner.vue'
import coreTechnology from '@/components/coreTechnology.vue'
import { Loading } from "element-ui";
export default {
	components: {
		coreTechnology,
		banner,
		Foots,
		Head
	},
	data() {
		return {

		}
	},
	mounted() {
		 this.initData()
	},
	computed: {

	},
	methods: {
		initData(){
			this.$http({
                url: this.$http.adornUrl('platform/softVersion/list'),
                method: 'get',
            }).then(({ data }) => {
                if (data.code == 200) {
                    if (data.rows.length > 0) {
                        let filterArray = data.rows.filter(item => { return item.fileName == '客服优选'&&item.fileType == '0' })
                        filterArray.sort((a, b) => a.version - b.version);
                        let ossFileName = filterArray[0].ossFileName
                        let fileName = filterArray[0].fileName
                      	 let version = filterArray[0].version
						this.$refs.bannerRef.initData(ossFileName,fileName,version)
                    }
                }
            })
		}
	}
}
</script>

<style scoped></style>
